<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="java.util.List"%>
<%@ page import="tw.com.msig.b2c.car.insurance.vo.InsItemVo"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<jsp:include page="/layout/meta.jsp" />
</head>
<body>
	<div id="header">
		<jsp:include page="/layout/header.jsp" />
	</div>
	<div id="navigator">
		<jsp:include page="/layout/navigator.jsp" />
	</div>
	<div id="container" class="panel panel-default">

			<ol class="panel-heading breadcrumb">
				<li>step2</li>
			</ol>
			<div class="panel-body">
				<form id="form" class="form-horizontal"
					action="<%=request.getContextPath()%>/application/apply.do?sActionType=step5" method="post">
					<input type="hidden" name="ident" value="${policyVo.ident}" />
					<input type="hidden" name="idNo" value="${policyVo.idNo}" />
					<input type="hidden" name="name" value="${policyVo.name}" />
					<input type="hidden" name="birDate" value="${policyVo.birDate}" />
					<input type="hidden" name="carTypeCode" value="${policyVo.carTypeCode}" />
					<input type="hidden" name="licenseNo" value="${policyVo.licenseNo}" />
					
					<div class="form-group">
						<label class="col-sm-2 control-label">身份證號</label>
						<div class="col-sm-2">
							 ${policyVo.idNo}
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">車牌號碼</label>
						<div class="col-sm-2">
							 ${policyVo.licenseNo}
						</div>
					</div>			
					<div class="form-group">
						<label class="col-sm-2 control-label">險種</label>
						<div class="col-sm-2">
							<table class="table table-bordered">
								<tr>
									<td></td>
									<td>insItemCode</td>
									<td>Description</td>
									<td>Amounts</td>
									<td>Premium</td>
								</tr>
								<%
									List<InsItemVo> insItemVos = (List<InsItemVo>) request.getAttribute("insItems");
									
									for(InsItemVo insItem:insItemVos) {
								
										//pageContext.setAttribute("city", city);
								%>
										<tr>
											<td>
												<input type="checkbox" name="chkInsItemVos" value="<%=insItem.getCode()%>" />
											</td>
											<td>
												<%=insItem.getCode()%>
											</td>
											<td>
												<%=insItem.getDescription()%>
												<input type="hidden" name="description_<%=insItem.getCode()%>" value="<%=insItem.getDescription()%>" />
											</td>
											<td>
												<%=insItem.getAmounts()%>
												<input type="hidden" name="amounts_<%=insItem.getCode()%>" value="<%=insItem.getAmounts()%>" />
											</td>
											<td>
												<%=insItem.getPremium()%>
												<input type="hidden" name="premium_<%=insItem.getCode()%>" value="<%=insItem.getPremium()%>" />
											</td>
										</tr>
								<%
									}
								%>
							</table>
							 
						</div>	
					</div>		
					

					<button id="submitBtn" class="col-sm-offset-1 btn btn-primary btn-lg">存檔</button>
					
				</form>
			</div>
		</div>

</body>
</html>